//
//  main.m
//  英汉词典
//
//  Created by qianfeng on 15/8/11.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XYanalysis.h"
#define PATH  @"/Users/qianfeng/Desktop/dict.txt"

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        XYanalysis * analysis = [[XYanalysis alloc]init];
        [analysis analysisWithPath:PATH];
        
        [analysis analysisWithPath:@"a"];
        char words[100] = {};
        char * p = words;
        int a ;
        while (1) {
            printf("=======欢迎使用英汉词典=======\n");
            printf("请输入单词:");
            scanf("%s",p);
            [analysis findEnglishWithChinese:[NSString stringWithFormat:@"%s",p]];
            printf("1.继续 2.退出\n");
            scanf("%d",&a);
            if (a  == 1) {
                
            }
            else{
                exit(0);
            }
            
        }
        
    }
    return 0;
}









